<?php
use tpfcore\Core;
?>
<!doctype html>
<html>
	<head>
		<title>订单详情</title>
		<meta charset="utf-8">
		<!-- Set render engine for 360 browser -->
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<!-- HTML5 shim for IE8 support of HTML5 elements -->
		<!--[if lt IE 9]>
			<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js">
			</script>
		<![endif]-->
		<link href="{$admin_assets_path}/css/theme.min.css" rel="stylesheet">
		<link href="{$admin_assets_path}/css/simplebootadmin.css" rel="stylesheet">
		<link href="{$admin_assets_path}/css/default.css" rel="stylesheet" />
		<link href="{$admin_assets_path}/css/font-awesome.min.css"
		rel="stylesheet" type="text/css">
		<style type="text/css">
			.length_3{width: 180px;} form .input-order{margin-bottom: 0px;padding:3px;width:40px;}
			.table-actions{margin-top: 5px; margin-bottom: 5px;padding:0px;} .table-list{margin-bottom:
			0px;}
			.order-info title{font-weight: bold;}
			.txt-center{text-align: center;}
			.order-info .title{padding:10px;border:1px solid #ddd;border-radius:0;margin-bottom:0;border-bottom:0;text-align:center; background-color: #ecf0f1; font-weight: bold; margin-top: 20px;}
			.order-info table th{border:1px solid #ddd;}
			.order-info table td{border:1px solid #ddd;}
			.order-info table th{}
			.order-info .title .fa-pencil{margin-left:10px;}
			.goods_thumb{max-width: 100px; height: auto; margin-right: 10px;}
		</style>
		<!--[if IE 7]>
			<link rel="stylesheet" href="{$admin_assets_path}/css/font-awesome-ie7.min.css">
		<![endif]-->
		<script type="text/javascript">
			//全局变量
			var GV = {
				WEB_ROOT:"",
				DIMAUB: "/",
				JS_ROOT: "/theme/backend/assets/js/",
				TOKEN: ""
			};
		</script>
		<!-- Le javascript==================================================-
		-> <!-- Placed at the end of the document so the pages load faster -->
		<script src="{$admin_assets_path}/js/jquery.js"></script>
		<script src="{$admin_assets_path}/js/wind.js"></script>
		<script src="{$admin_assets_path}/js/bootstrap.min.js"></script>
	</head>
	<body>
		<div class="wrap">
		<ul class="nav nav-tabs">
			<li><a href="{:url('mall/Order/index')}">订单管理</a></li>
			<li class="active"><a href="javascript:;">订单详情</a></li>
		</ul>
		<div class="order-info">
			<div class="title txt-center">基本信息</div>
			<table style="width:100%;" border="0" cellspacing="1" cellpadding="6">
				<tbody>
				<tr>
					<th align="right" width="300">订单号：</th>
					<td>{$list[0]->order_sn}</td>
					<th align="right" width="300">订单状态：</th>
					<td>
						{if condition="$list[0]['order_status'] lt 2"}<font class="green">已确认</font>
						{elseif condition="$list[0]['order_status'] eq 2"}<font class="green">已取消</font>
						{elseif condition="$list[0]['order_status'] eq 3"}<font class="green">已确认</font>
						{elseif condition="$list[0]['order_status'] eq 4"}<font class="green">已退货</font>
						{else/}<font class="green">已确认</font>
						{/if}
						/
						{if condition="$list[0]['pay_status'] eq 0"}<font class="red">未付款</font>
						{elseif condition="$list[0]['pay_status'] eq 1"}<font class="green">已付款</font>
						{elseif condition="$list[0]['pay_status'] eq 4"}<font class="green">付款取消</font>
						{else/}
						{/if}
						/
						{if condition="$list[0]['shipping_status'] eq 0"}<font class="red">未发货</font>
						{elseif condition="$list[0]['shipping_status'] eq 1"}<font class="green">配货中</font>
						{elseif condition="$list[0]['shipping_status'] eq 2"}<font class="green">已发货</font>
						{elseif condition="$list[0]['shipping_status'] eq 3"}<font class="green">已收货</font>
						{else/}
						{/if}
					</td>
				</tr>
				<tr>
					<th align="right" width="300">会员：</th>
					<td>{$list[0]['username']}</td>
					<th align="right" width="300">下单时间：</th>
					<td>{$list[0]['add_time']|date='Y-m-d H:i:s',###}</td>
				</tr>
				<tr>
					<th align="right" width="300">支付方式：</th>
					<td>{$list[0]->pay_name}</td>
					<th align="right" width="300">付款时间：</th>
					<td>{if condition="$list[0]['pay_status'] eq 1"}{$list[0]['pay_time']|date='Y-m-d H:i:s',###}{/if}</td>
				</tr>
				<tr>
					<th align="right" width="300">支付金额：</th>
					<td>{if condition="$list[0]['pay_status'] eq 1"}{$list[0]['order_amount']}{else/}0{/if}</td>
					<th align="right" width="300">发货时间：</th>
					<td>{if condition="$list[0]['order_status'] eq 3"}{$list[0]['shipping_time']|date='Y-m-d H:i:s',###}{/if}</td>
				</tr>
				</tbody>
			</table>
			<div class="title txt-center">收货人信息</div>
			<table style="width:100%;" border="0" cellspacing="1" cellpadding="6">
				<tbody><tr>
					<th align="right" width="300">收货人：</th>
					<td>{$list[0]['consignee']}</td>
					<th align="right" width="300">联系电话：</th>
					<td>{$list[0]['mobile']}</td>
				</tr>
				<tr>
					<th align="right" width="300">收货地址：</th>
					<td>{$list[0]['address']}</td>
					<th align="right" width="300">配送物流：</th>
					<td width="300">{$list[0]['shipping_name']}</td>
				</tr>				
			</tbody></table>
			<div class="title txt-center">商品信息</div>
			<table style="width:100%;" border="0" cellspacing="1" cellpadding="6">
				<tbody><tr>
					<th>商品名称</th>
					<th>商品规格</th>
					<th>数量</th>
					<th>商品单价</th>
					<th>商品小计</th>
				</tr>
				{volist name="$list[0]['goods']" id="vo"}
				<tr>
					<td align="center">{notempty name="vo.goods_thumb"}<img src="{$vo.goods_thumb}" class="goods_thumb" />{/notempty}{$vo.goods_name}</td>
					<td width="250" align="center">规格待完善</td>
					<td width="200" align="center">{$vo.number}</td>
					<td width="200" align="center">¥{$vo.goods_price}</td>
					<td width="200" align="center">¥{:number_format($vo.goods_price*$vo.number,2)}</td>
				</tr>
				{/volist}
				</tbody>
			</table>
			<div class="title txt-center">费用信息</div>
			<table style="width:100%;" border="0" cellspacing="1" cellpadding="6">
				<tbody><tr>
					<th align="right" width="300">订单总价：</th>
					<td>{$list[0]['goods_price']}</td>
					<th align="right" width="300">运费：</th>
					<td>{$list[0]['shipping_price']}</td>
				</tr>
				<tr>
					<th align="right" width="300">优惠券：</th>
					<td>{$list[0]['coupon_price']}</td>
					<th align="right" width="300">实际支付：</th>
					<td>{$list[0]['order_amount']}</td>
				</tr>				
			</tbody></table>
			<div class="title txt-center">操作</div>
			<form class="js-ajax-form" action="" method="post" novalidate="novalidate">
			<table style="width:100%;" border="0" cellspacing="1" cellpadding="6">
				<tbody>
					<tr>
					<th align="right" width="200">操作备注：</th>
					<td>
						<textarea name="note" id="" style="width:500px;height:50px;"></textarea>
					</td>
					</tr>
					<tr>
					<th align="right" width="200">当前可执行操作：</th>
					<td>
						<a class="btn btn-primary" href="/index.php/Goods/AdminOrder/ship_info/order_id/161.html" style="margin-right:10px;">发货</a>
						<button type="submit" class="btn btn-primary js-ajax-submit" data-action="/index.php/Goods/AdminOrder/orderOperate/order_id/161/type/cancel.html" style="margin-right:10px;">取消</button>								
						<button type="submit" class="btn btn-primary js-ajax-submit" data-action="/index.php/Goods/AdminOrder/orderOperate/order_id/161/type/nopay.html" style="margin-right:10px;">未付款</button>								
						<button type="submit" class="btn btn-primary js-ajax-submit" data-action="/index.php/Goods/AdminOrder/orderOperate/order_id/161/type/invalid.html" style="margin-right:10px;">无效</button>								
						<button type="button" class="btn" onclick="history.back(-1)">返回</button>
					</td>
				</tr>
			</tbody></table>
			</form>
			<div class="title txt-center">操作记录</div>
			<table style="width:100%;" border="0" cellspacing="1" cellpadding="6">
				<tbody><tr>
					<th>操作人</th>
					<th>操作时间</th>
					<th>订单状态</th>
					<th>操作备注</th>
				</tr>
				{volist name="listOrderAction" id="vo"}
				<tr>
					<td align="center">{$vo.username}（{eq name="$vo.type" value="0"}普通用户{else/}管理员{/eq}）</td>
					<td align="center">{$vo.datetime|date='Y-m-d H:i:s',###}</td>
					<td align="center">
						{if condition="$vo.order_status lt 2"}<font class="green">已确认</font>
						{elseif condition="$vo.order_status eq 2"}<font class="green">已取消</font>
						{elseif condition="$vo.order_status eq 3"}<font class="green">已确认</font>
						{elseif condition="$vo.order_status eq 4"}<font class="green">已退货</font>
						{else/}<font class="green">已确认</font>
						{/if}
						/
						{if condition="$vo.pay_status eq 0"}<font class="red">未付款</font>
						{elseif condition="$vo.pay_status eq 1"}<font class="green">已付款</font>
						{elseif condition="$vo.pay_status eq 4"}<font class="green">付款取消</font>
						{else/}
						{/if}
						/
						{if condition="$vo.shipping_status eq 0"}<font class="red">未发货</font>
						{elseif condition="$vo.shipping_status eq 1"}<font class="green">配货中</font>
						{elseif condition="$vo.shipping_status eq 2"}<font class="green">已发货</font>
						{elseif condition="$vo.shipping_status eq 3"}<font class="green">已收货</font>
						{else/}
						{/if}	
					</td>
					<td align="center">{$vo.note}</td>
				</tr>
				{/volist}		
				</tbody>
			</table>
		</div>
	</div>
		<script src="{$admin_assets_path}/js/common.js"></script>
	</body>

</html>